package com.team.controller;

import com.team.service.IndexTitleService;
import com.team.service.NewsSpecialService;
import com.team.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * -*- coding:utf-8 -*-
 *
 * @author 太阳偷渡青山
 * @software IntelliJ IDEA
 * @date 2022/10/18 7:56
 * @Description
 */
@RestController
@RequestMapping("indexTitle")
public class IndexTitleController {
    @Autowired
    private IndexTitleService indexTitleService;

    @GetMapping("menu")
    public Result list(){
        return indexTitleService.findAll();
    }

    @GetMapping("findById")
    public Result findById(Integer id){
        return indexTitleService.findById(id);
    }

    @RequestMapping("newkind1")
    public Result findAllKind1(){
        return indexTitleService.findAllKind1();
    }

    @RequestMapping("newkind1ById")
    public Result newkind1ById(Integer id){
        return indexTitleService.findAllKind1ById(id);
    }

    @RequestMapping("newkind2")
    public Result findAllKind2(){
        return indexTitleService.findAllKind2();
    }

    @RequestMapping("newkind2ById")
    public Result newkind2ById(Integer id){
        return indexTitleService.findAllKind2ById(id);
    }
}
